home *** CD-ROM | disk | FTP | other *** search
- Path: fch.wimsey.bc.ca!fch!dan
- From: dan@fch.wimsey.bc.ca (Dan Fandrich)
- Newsgroups: comp.sys.cbm
- Subject: Re: Want to read/record temp with c64
- Distribution: world
- Message-ID: <310cb9df.195sn@fch.wimsey.bc.ca>
- Date: Mon, 29 Jan 1996 04:13:19 -0800
- References: <4e75jl$je4@news.csus.edu>
- Organization: Fandrich Cone Harvesters Ltd.
- Mime-Version: 1.0
- Content-Type: text/plain; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
- X-Newsreader: Simple News 1.92 [alpha4] (DOS)
- X-Posting-Software: UUPC/extended 1.12i inews (15Mar94 08:36)
-
- In article <4e75jl$je4@news.csus.edu> mrubin@gallium writes:
- >I would like to hook up a sensor to one of my spare c64s to read and
- >record outside temperatures.
- >
- >I can probably handle the programming, but what do I need to do the
- >sensing and where would I wire it in?
- >
- >Anyone done this before?
-
- I've done this before using thermisters connected to a PC's game port and
- gotten accuracy to better than +/- 0.5 ░C. I don't see why this wouldn't
- work on a C64 by connecting them to the paddle ports. Here's part of
- the documentation I wrote for the PC project:
-
- To obtain accurate results in the range of about 10 ░C
- to 40 degrees C, thermistors with a nominal resistance of
- about 100 kilohms at 25 degrees should be used, with a
- temperature coefficient of about -4 %/degree, such as
- Digi-Key part number KC013G or KC006T. A small resistor
- (e.g. 50 ohms) can be placed in series with the power
- leads to limit current flow from the game port card in
- case of a short. The value of the resistor can be nulli-
- fied in the calibration stage.
-
- The safety resistor shouldn't be necessary on the C64 because of the
- different design of the paddle port. You will need to determine a
- mapping from the paddle port values to resistance in ohms (it's linear
- on a PC; if it isn't on a 64, it ought to be). Then use the following
- equation to get a temperature:
-
- For the thermistors, these values are d and c in the equa-
- tion t(r)=c+ln(100000)/s-ln(r)/s, where r is the resis-
- tance of the thermistor in ohms and t is its temperature.
- Practically, d is the proportional resistance change in
- ohms at 100 kilohms, and c is the temperature of the ther-
- mistor in degrees Celsius at 100 kilohms. For the ther-
- mistors used in the lab, d is approximately 0.047 and c is
- approximately 25.
-
- >>> Dan
- --
- dan@fch.wimsey.bc.ca / MIME email ok / finger danf@vanbc.wimsey.com for pgp key
-